/** * @license * Adobe Visitor API for JavaScript version: 3.2.0 * Copyright 2018 Adobe, Inc. All Rights Reserved * More info available at https://marketing.adobe.com/resources/help/en_US/mcvid/ */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Visitor=t()}(this,function(){"use strict";function e(){return{callbacks:{},add:function(e,t){this.callbacks[e]=this.callbacks[e]||[];var n=this.callbacks[e].push(t)-1;return function(){this.callbacks[e].splice(n,1)}},execute:function(e,t){if(this.callbacks[e]){t=(t=void 0===t?[]:t)instanceof Array?t:[t];try{for(;this.callbacks[e].length;){var n=this.callbacks[e].shift();"function"==typeof n?n.apply(null,t):n instanceof Array&&n[1].apply(n[0],t)}delete this.callbacks[e]}catch(e){}}},executeAll:function(e,t){(t||e&&!v.isObjectEmpty(e))&&Object.keys(this.callbacks).forEach(function(t){var n=void 0!==e[t]?e[t]:"";this.execute(t,n)},this)},hasCallbacks:function(){return Boolean(Object.keys(this.callbacks).length)}}}function t(e){for(var t=/^\d+$/,n=0,i=e.length;na)return 1;if(a>i)return-1}return 0}function a(e,a){if(e===a)return 0;var r=e.toString().split("."),s=a.toString().split(".");return t(r.concat(s))?(n(r,s),i(r,s)):NaN}var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Object.assign=Object.assign||function(e){for(var t,n,i=1;i4;e--){var t=document.createElement("div");if(t.innerHTML="",t.getElementsByTagName("span").length)return t=null,e;t=null}return null},s.encodeAndBuildRequest=function(e,t){return e.map(encodeURIComponent).join(t)},void(s.isObject=function(e){return null!==e&&"object"==typeof e&&!1===Array.isArray(e)}),o.exports),y=(v.isObjectEmpty,v.isValueEmpty,v.getIeVersion,v.encodeAndBuildRequest,v.isObject,e),b=c.MESSAGES,D={0:"prefix",1:"orgID",2:"state"},S=function(e,t){this.parse=function(e){try{var t={};return e.data.split("|").forEach(function(e,n){void 0!==e&&(t[D[n]]=2!==n?e:JSON.parse(e))}),t}catch(e){}},this.isInvalid=function(n){var i=this.parse(n);if(!i||Object.keys(i).length<2)return!0;var a=e!==i.orgID,r=!t||n.origin!==t,s=-1===Object.keys(b).indexOf(i.prefix);return a||r||s},this.send=function(n,i,a){var r=i+"|"+e;a&&a===Object(a)&&(r+="|"+JSON.stringify(a));try{n.postMessage(r,t)}catch(e){}}},C=c.MESSAGES,k=function(e,t,n,i){function a(e){Object.assign(v,e)}function s(e){Object.assign(v.state,e),v.callbackRegistry.executeAll(v.state)}function o(e){if(!k.isInvalid(e)){D=!1;var t=k.parse(e);v.setStateAndPublish(t.state)}}function c(e){!D&&b&&(D=!0,k.send(i,e))}function l(){a(new u(n._generateID)),v.getMarketingCloudVisitorID(),v.callbackRegistry.executeAll(v.state,!0),r.removeEventListener("message",d)}function d(e){if(!k.isInvalid(e)){var t=k.parse(e);D=!1,r.clearTimeout(this.timeout),r.removeEventListener("message",d),a(new g(v)),r.addEventListener("message",o),v.setStateAndPublish(t.state),v.callbackRegistry.hasCallbacks()&&c(C.GETSTATE)}}function f(){b&&postMessage?(r.addEventListener("message",d),c(C.HANDSHAKE),this.timeout=setTimeout(l,250)):l()}function p(){r.s_c_in||(r.s_c_il=[],r.s_c_in=0),v._c="Visitor",v._il=r.s_c_il,v._in=r.s_c_in,v._il[v._in]=v,r.s_c_in++}function h(){function e(e){0!==e.indexOf("_")&&"function"==typeof n[e]&&(v[e]=function(){})}Object.keys(n).forEach(e),v.getSupplementalDataID=n.getSupplementalDataID}var v=this,b=t.whitelistParentDomain;v.state={},v.version=n.version,v.marketingCloudOrgID=e,v.cookieDomain=n.cookieDomain||"",v._instanceType="child";var D=!1,k=new S(e,b);v.callbackRegistry=y(),v.init=function(){p(),h(),a(new m(v)),f()},v.findField=function(e,t){if(v.state[e])return t(v.state[e]),v.state[e]},v.messageParent=c,v.setStateAndPublish=s},_=c.MESSAGES,I=c.ALL_APIS,E=c.ASYNC_API_MAP,L=c.FIELDGROUP_TO_FIELD,A=function(e,t){function n(){var t={};return Object.keys(I).forEach(function(n){var i=I[n],a=e[i]();v.isValueEmpty(a)||(t[n]=a)}),t}function i(){var t=[];return e._loading&&Object.keys(e._loading).forEach(function(n){if(e._loading[n]){var i=L[n];t.push(i)}}),t.length?t:null}function a(t){return function n(){var a=i();if(a){var r=E[a[0]];e[r](n,!0)}else t()}}function r(e,i){var a=n();t.send(e,i,a)}function s(e){c(e),r(e,_.HANDSHAKE)}function o(e){a(function(){r(e,_.PARENTSTATE)})()}function c(n){function i(i){a.call(e,i),t.send(n,_.PARENTSTATE,{CUSTOMERIDS:e.getCustomerIDs()})}var a=e.setCustomerIDs;e.setCustomerIDs=i}return function(e){t.isInvalid(e)||(t.parse(e).prefix===_.HANDSHAKE?s:o)(e.source)}},T=function(e,t){function n(e){return function(n){i[e]=n,++a===r&&t(i)}}var i={},a=0,r=Object.keys(e).length;Object.keys(e).forEach(function(t){var i=e[t];if(i.fn){var a=i.args||[];a.unshift(n(t)),i.fn.apply(i.context||null,a)}})},P=function(e){var t;if(!e&&r.location&&(e=r.location.hostname),t=e)if(/^[0-9.]+$/.test(t))t="";else{var n=",ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,ax,az,ba,bb,be,bf,bg,bh,bi,bj,bm,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,cl,cm,cn,co,cr,cu,cv,cw,cx,cz,de,dj,dk,dm,do,dz,ec,ee,eg,es,et,eu,fi,fm,fo,fr,ga,gb,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,im,in,io,iq,ir,is,it,je,jo,jp,kg,ki,km,kn,kp,kr,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,na,nc,ne,nf,ng,nl,no,nr,nu,nz,om,pa,pe,pf,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,rs,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sx,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,yt,",i=t.split("."),a=i.length-1,s=a-1;if(a>1&&i[a].length<=2&&(2===i[a-1].length||n.indexOf(","+i[a]+",")<0)&&s--,s>0)for(t="";a>=s;)t=i[a]+(t?".":"")+t,a--}return t},M={compare:a,isLessThan:function(e,t){return a(e,t)<0},areVersionsDifferent:function(e,t){return 0!==a(e,t)},isGreaterThan:function(e,t){return a(e,t)>0},isEqual:function(e,t){return 0===a(e,t)}},w=!!r.postMessage,O={postMessage:function(e,t,n){var i=1;t&&(w?n.postMessage(e,t.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):t&&(n.location=t.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+e))},receiveMessage:function(e,t){var n;try{w&&(e&&(n=function(n){if("string"==typeof t&&n.origin!==t||"[object Function]"===Object.prototype.toString.call(t)&&!1===t(n.origin))return!1;e(n)}),r.addEventListener?r[e?"addEventListener":"removeEventListener"]("message",n):r[e?"attachEvent":"detachEvent"]("onmessage",n))}catch(e){}}},V=function(e){var t,n,i="0123456789",a="",r="",s=8,o=10,c=10;if(1==e){for(i+="ABCDEF",t=0;16>t;t++)n=Math.floor(Math.random()*s),a+=i.substring(n,n+1),n=Math.floor(Math.random()*s),r+=i.substring(n,n+1),s=16;return a+"-"+r}for(t=0;19>t;t++)n=Math.floor(Math.random()*o),a+=i.substring(n,n+1),0===t&&9==n?o=3:(1==t||2==t)&&10!=o&&2>n?o=10:2n?c=10:20&&(n=!1)),{corsType:t,corsCookiesEnabled:n}),getCORSInstance:function(){return"none"===this.corsMetadata.corsType?null:new r[this.corsMetadata.corsType]},fireCORS:function(t,n){function i(e){var n;try{if((n=JSON.parse(e))!==Object(n))return void a.handleCORSError(t,null,"Response is not JSON")}catch(e){return void a.handleCORSError(t,e,"Error parsing response as JSON")}try{for(var i=t.callback,s=r,o=0;o=r&&(e.splice(a,1),a--);return{dataPresent:s,dataValid:o}},manageSyncsSize:function(e){if(e.join("*").length>this.MAX_SYNCS_LENGTH)for(e.sort(function(e,t){return parseInt(e.split("-")[1],10)-parseInt(t.split("-")[1],10)});e.join("*").length>this.MAX_SYNCS_LENGTH;)e.shift()},fireSync:function(t,n,i,a,r,s){var o=this;if(t){if("img"===n.tag){var c,l,u,d,f=n.url,p=e.loadSSL?"https:":"http:";for(c=0,l=f.length;cR.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function e(){t.startedAttachingIframe||(n.body?t.attachIframe():setTimeout(e,30))}var t=this;e()}}},F={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},disableThirdPartyCalls:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},overwriteCrossDomainMCIDAndAID:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},H={getConfigNames:function(){return Object.keys(F)},getConfigs:function(){return F}},U=function(e,t,n){function i(e){var t=e;return function(e){var n=e||d.location.href;try{var i=u._extractParamFromUri(n,t);if(i)return E.parsePipeDelimetedKeyValues(i)}catch(e){}}}function a(e){function t(e,t){e&&e.match(R.VALID_VISITOR_ID_REGEX)&&t(e)}t(e[h],u.setMarketingCloudVisitorID),u._setFieldExpire(C,-1),t(e[b],u.setAnalyticsVisitorID)}function s(e){e=e||{},u._supplementalDataIDCurrent=e.supplementalDataIDCurrent||"",u._supplementalDataIDCurrentConsumed=e.supplementalDataIDCurrentConsumed||{},u._supplementalDataIDLast=e.supplementalDataIDLast||"",u._supplementalDataIDLastConsumed=e.supplementalDataIDLastConsumed||{}}function o(e){function t(e,t,n){return(n=n?n+="|":n)+(e+"=")+encodeURIComponent(t)}function n(e,n){var i=n[0],a=n[1];return null!=a&&a!==k&&(e=t(i,a,e)),e}var i,a=e.reduce(n,"");return(i=(i=a)?i+="|":i)+"TS="+E.getTimestampInSeconds()}function l(e){var t=e.minutesToLive,n="";return(u.idSyncDisableSyncs||u.disableIdSyncs)&&(n=n||"Error: id syncs have been disabled"),"string"==typeof e.dpid&&e.dpid.length||(n=n||"Error: config.dpid is empty"),"string"==typeof e.url&&e.url.length||(n=n||"Error: config.url is empty"),void 0===t?t=20160:(t=parseInt(t,10),(isNaN(t)||t<=0)&&(n=n||"Error: config.minutesToLive needs to be a positive number")),{error:n,ttl:t}}if(!n||n.split("").reverse().join("")!==e)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var u=this;u.version="3.2.0";var d=r,f=d.Visitor;f.version=u.version,f.AuthState=c.AUTH_STATE,f.OptOut=c.OPT_OUT,d.s_c_in||(d.s_c_il=[],d.s_c_in=0),u._c="Visitor",u._il=d.s_c_il,u._in=d.s_c_in,u._il[u._in]=u,d.s_c_in++,u._instanceType="regular",u._log={requests:[]},u.marketingCloudOrgID=e,u.cookieName="AMCV_"+e,u.sessionCookieName="AMCVS_"+e,u.cookieDomain=P(),u.cookieDomain===d.location.hostname&&(u.cookieDomain=""),u.loadSSL=d.location.protocol.toLowerCase().indexOf("https")>=0,u.loadTimeout=3e4,u.CORSErrors=[],u.marketingCloudServer=u.audienceManagerServer="dpm.demdex.net",u.sdidParamExpiry=30;var p=d.document,g=null,h="MCMID",m="MCIDTS",y="A",b="MCAID",D="AAM",C="MCAAMB",k="NONE",_=function(e){return!Object.prototype[e]},I=x(u);u.FIELDS=c.FIELDS,u.cookieRead=function(e){e=encodeURIComponent(e);var t=(";"+p.cookie).split(" ").join(";"),n=t.indexOf(";"+e+"="),i=n<0?n:t.indexOf(";",n+1);return n<0?"":decodeURIComponent(t.substring(n+2+e.length,i<0?t.length:i))},u.cookieWrite=function(e,t,n){var i,a=u.cookieLifetime;if(t=""+t,a=a?(""+a).toUpperCase():"",n&&"SESSION"!==a&&"NONE"!==a){if(i=""!==t?parseInt(a||0,10):-60)(n=new Date).setTime(n.getTime()+1e3*i);else if(1===n){var r=(n=new Date).getYear();n.setYear(r+2+(r<1900?1900:0))}}else n=0;return e&&"NONE"!==a?(p.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; path=/;"+(n?" expires="+n.toGMTString()+";":"")+(u.cookieDomain?" domain="+u.cookieDomain+";":""),u.cookieRead(e)===t):0},u.resetState=function(e){e?u._mergeServerState(e):s()},u._isAllowedDone=!1,u._isAllowedFlag=!1,u.isAllowed=function(){return u._isAllowedDone||(u._isAllowedDone=!0,(u.cookieRead(u.cookieName)||u.cookieWrite(u.cookieName,"T",1))&&(u._isAllowedFlag=!0)),u._isAllowedFlag},u.setMarketingCloudVisitorID=function(e){u._setMarketingCloudFields(e)},u._use1stPartyMarketingCloudServer=!1,u.getMarketingCloudVisitorID=function(e,t){if(u.isAllowed()){u.marketingCloudServer&&u.marketingCloudServer.indexOf(".demdex.net")<0&&(u._use1stPartyMarketingCloudServer=!0);var n=u._getAudienceManagerURLData("_setMarketingCloudFields"),i=n.url;return u._getRemoteField(h,i,e,t,n)}return""},u.getVisitorValues=function(e,t){var n={MCMID:{fn:u.getMarketingCloudVisitorID,args:[!0],context:u},MCOPTOUT:{fn:u.isOptedOut,args:[void 0,!0],context:u},MCAID:{fn:u.getAnalyticsVisitorID,args:[!0],context:u},MCAAMLH:{fn:u.getAudienceManagerLocationHint,args:[!0],context:u},MCAAMB:{fn:u.getAudienceManagerBlob,args:[!0],context:u}},i=t&&t.length?E.pluck(n,t):n;T(i,e)},u._currentCustomerIDs={},u._customerIDsHashChanged=!1,u._newCustomerIDsHash="",u.setCustomerIDs=function(e){function t(){u._customerIDsHashChanged=!1}if(u.isAllowed()&&e){if(!v.isObject(e)||v.isObjectEmpty(e))return!1;var n,i;for(n in u._readVisitor(),e)if(_(n)&&(i=e[n]))if("object"==typeof i){var a={};i.id&&(a.id=i.id),null!=i.authState&&(a.authState=i.authState),u._currentCustomerIDs[n]=a}else u._currentCustomerIDs[n]={id:i};var r=u.getCustomerIDs(),s=u._getField("MCCIDH"),o="";for(n in s||(s=0),r)_(n)&&(o+=(o?"|":"")+n+"|"+((i=r[n]).id?i.id:"")+(i.authState?i.authState:""));u._newCustomerIDsHash=String(u._hash(o)),u._newCustomerIDsHash!==s&&(u._customerIDsHashChanged=!0,u._mapCustomerIDs(t))}},u.getCustomerIDs=function(){u._readVisitor();var e,t,n={};for(e in u._currentCustomerIDs)_(e)&&(t=u._currentCustomerIDs[e],n[e]||(n[e]={}),t.id&&(n[e].id=t.id),null!=t.authState?n[e].authState=t.authState:n[e].authState=f.AuthState.UNKNOWN);return n},u.setAnalyticsVisitorID=function(e){u._setAnalyticsFields(e)},u.getAnalyticsVisitorID=function(e,t,n){if(!E.isTrackingServerPopulated()&&!n)return u._callCallback(e,[""]),"";if(u.isAllowed()){var i="";if(n||(i=u.getMarketingCloudVisitorID(function(){u.getAnalyticsVisitorID(e,!0)})),i||n){var a=n?u.marketingCloudServer:u.trackingServer,r="";u.loadSSL&&(n?u.marketingCloudServerSecure&&(a=u.marketingCloudServerSecure):u.trackingServerSecure&&(a=u.trackingServerSecure));var s={};if(a){var o="http"+(u.loadSSL?"s":"")+"://"+a+"/id",c="d_visid_ver="+u.version+"&mcorgid="+encodeURIComponent(u.marketingCloudOrgID)+(i?"&mid="+encodeURIComponent(i):"")+(u.idSyncDisable3rdPartySyncing||u.disableThirdPartyCookies?"&d_coppa=true":""),l=["s_c_il",u._in,"_set"+(n?"MarketingCloud":"Analytics")+"Fields"];r=o+"?"+c+"&callback=s_c_il%5B"+u._in+"%5D._set"+(n?"MarketingCloud":"Analytics")+"Fields",s.corsUrl=o+"?"+c,s.callback=l}return s.url=r,u._getRemoteField(n?h:b,r,e,t,s)}}return""},u.getAudienceManagerLocationHint=function(e,t){if(u.isAllowed()&&u.getMarketingCloudVisitorID(function(){u.getAudienceManagerLocationHint(e,!0)})){var n=u._getField(b);if(!n&&E.isTrackingServerPopulated()&&(n=u.getAnalyticsVisitorID(function(){u.getAudienceManagerLocationHint(e,!0)})),n||!E.isTrackingServerPopulated()){var i=u._getAudienceManagerURLData(),a=i.url;return u._getRemoteField("MCAAMLH",a,e,t,i)}}return""},u.getLocationHint=u.getAudienceManagerLocationHint,u.getAudienceManagerBlob=function(e,t){if(u.isAllowed()&&u.getMarketingCloudVisitorID(function(){u.getAudienceManagerBlob(e,!0)})){var n=u._getField(b);if(!n&&E.isTrackingServerPopulated()&&(n=u.getAnalyticsVisitorID(function(){u.getAudienceManagerBlob(e,!0)})),n||!E.isTrackingServerPopulated()){var i=u._getAudienceManagerURLData(),a=i.url;return u._customerIDsHashChanged&&u._setFieldExpire(C,-1),u._getRemoteField(C,a,e,t,i)}}return""},u._supplementalDataIDCurrent="",u._supplementalDataIDCurrentConsumed={},u._supplementalDataIDLast="",u._supplementalDataIDLastConsumed={},u.getSupplementalDataID=function(e,t){u._supplementalDataIDCurrent||t||(u._supplementalDataIDCurrent=u._generateID(1));var n=u._supplementalDataIDCurrent;return u._supplementalDataIDLast&&!u._supplementalDataIDLastConsumed[e]?(n=u._supplementalDataIDLast,u._supplementalDataIDLastConsumed[e]=!0):n&&(u._supplementalDataIDCurrentConsumed[e]&&(u._supplementalDataIDLast=u._supplementalDataIDCurrent,u._supplementalDataIDLastConsumed=u._supplementalDataIDCurrentConsumed,u._supplementalDataIDCurrent=n=t?"":u._generateID(1),u._supplementalDataIDCurrentConsumed={}),n&&(u._supplementalDataIDCurrentConsumed[e]=!0)),n},u.getOptOut=function(e,t){if(u.isAllowed()){var n=u._getAudienceManagerURLData("_setMarketingCloudFields"),i=n.url;return u._getRemoteField("MCOPTOUT",i,e,t,n)}return""},u.isOptedOut=function(e,t,n){if(u.isAllowed()){t||(t=f.OptOut.GLOBAL);var i=u.getOptOut(function(n){var i=n===f.OptOut.GLOBAL||n.indexOf(t)>=0;u._callCallback(e,[i])},n);return i?i===f.OptOut.GLOBAL||i.indexOf(t)>=0:null}return!1},u._fields=null,u._fieldsExpired=null,u._hash=function(e){var t,n=0;if(e)for(t=0;t0;)u._callCallback(n.shift(),t)}},u._addQuerystringParam=function(e,t,n,i){var a=encodeURIComponent(t)+"="+encodeURIComponent(n),r=E.parseHash(e),s=E.hashlessUrl(e);if(-1===s.indexOf("?"))return s+"?"+a+r;var o=s.split("?"),c=o[0]+"?",l=o[1];return c+E.addQueryParamAtLocation(l,a,i)+r},u._extractParamFromUri=function(e,t){var n=new RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);if(n&&n.length)return decodeURIComponent(n[1])},u._parseAdobeMcFromUrl=i(R.ADOBE_MC),u._parseAdobeMcSdidFromUrl=i(R.ADOBE_MC_SDID),u._attemptToPopulateSdidFromUrl=function(t){var n=u._parseAdobeMcSdidFromUrl(t),i=1e9;n&&n.TS&&(i=E.getTimestampInSeconds()-n.TS),n&&n.SDID&&n.MCORGID===e&&iR.ADOBE_MC_TTL_IN_MIN||t.MCORGID!==e)return;a(t)}},u._mergeServerState=function(e){if(e)try{if(i=e,(e=E.isObject(i)?i:JSON.parse(i))[u.marketingCloudOrgID]){var t=e[u.marketingCloudOrgID];n=t.customerIDs,E.isObject(n)&&u.setCustomerIDs(n),s(t.sdid)}}catch(e){throw new Error("`serverState` has an invalid format.")}var n,i},u._timeout=null,u._loadData=function(e,t,n,i){t=u._addQuerystringParam(t,"d_fieldgroup",e,1),i.url=u._addQuerystringParam(i.url,"d_fieldgroup",e,1),i.corsUrl=u._addQuerystringParam(i.corsUrl,"d_fieldgroup",e,1),w.fieldGroupObj[e]=!0,i===Object(i)&&i.corsUrl&&"XMLHttpRequest"===I.corsMetadata.corsType&&I.fireCORS(i,n,e)},u._clearTimeout=function(e){null!=u._timeout&&u._timeout[e]&&(clearTimeout(u._timeout[e]),u._timeout[e]=0)},u._settingsDigest=0,u._getSettingsDigest=function(){if(!u._settingsDigest){var e=u.version;u.audienceManagerServer&&(e+="|"+u.audienceManagerServer),u.audienceManagerServerSecure&&(e+="|"+u.audienceManagerServerSecure),u._settingsDigest=u._hash(e)}return u._settingsDigest},u._readVisitorDone=!1,u._readVisitor=function(){if(!u._readVisitorDone){u._readVisitorDone=!0;var e,t,n,i,a,r,s=u._getSettingsDigest(),o=!1,c=u.cookieRead(u.cookieName),l=new Date;if(null==u._fields&&(u._fields={}),c&&"T"!==c)for((c=c.split("|"))[0].match(/^[\-0-9]+$/)&&(parseInt(c[0],10)!==s&&(o=!0),c.shift()),c.length%2==1&&c.pop(),e=0;e1?(a=parseInt(t[1],10),r=t[1].indexOf("s")>0):(a=0,r=!1),o&&("MCCIDH"===n&&(i=""),a>0&&(a=l.getTime()/1e3-60)),n&&i&&(u._setField(n,i,1),a>0&&(u._fields["expire"+n]=a+(r?"s":""),(l.getTime()>=1e3*a||r&&!u.cookieRead(u.sessionCookieName))&&(u._fieldsExpired||(u._fieldsExpired={}),u._fieldsExpired[n]=!0)));!u._getField(b)&&E.isTrackingServerPopulated()&&(c=u.cookieRead("s_vi"))&&((c=c.split("|")).length>1&&c[0].indexOf("v1")>=0&&((e=(i=c[1]).indexOf("["))>=0&&(i=i.substring(0,e)),i&&i.match(R.VALID_VISITOR_ID_REGEX)&&u._setField(b,i)))}},u._appendVersionTo=function(e){var t="vVersion|"+u.version,n=e?u._getCookieVersion(e):null;return n?M.areVersionsDifferent(n,u.version)&&(e=e.replace(R.VERSION_REGEX,t)):e+=(e?"|":"")+t,e},u._writeVisitor=function(){var e,t,n=u._getSettingsDigest();for(e in u._fields)_(e)&&u._fields[e]&&"expire"!==e.substring(0,6)&&(t=u._fields[e],n+=(n?"|":"")+e+(u._fields["expire"+e]?"-"+u._fields["expire"+e]:"")+"|"+t);n=u._appendVersionTo(n),u.cookieWrite(u.cookieName,n,1)},u._getField=function(e,t){return null==u._fields||!t&&u._fieldsExpired&&u._fieldsExpired[e]?null:u._fields[e]},u._setField=function(e,t,n){null==u._fields&&(u._fields={}),u._fields[e]=t,n||u._writeVisitor()},u._getFieldList=function(e,t){var n=u._getField(e,t);return n?n.split("*"):null},u._setFieldList=function(e,t,n){u._setField(e,t?t.join("*"):"",n)},u._getFieldMap=function(e,t){var n=u._getFieldList(e,t);if(n){var i,a={};for(i=0;i0?e.substr(t):""},hashlessUrl:function(e){var t=e.indexOf("#");return t>0?e.substr(0,t):e},addQueryParamAtLocation:function(e,t,n){var i=e.split("&");return n=null!=n?n:i.length,i.splice(n,0,t),i.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(e,t,n){return e===b&&(t||(t=u.trackingServer),n||(n=u.trackingServerSecure),!("string"!=typeof(i=u.loadSSL?n:t)||!i.length)&&i.indexOf("2o7.net")<0&&i.indexOf("omtrdc.net")<0);var i},isObject:function(e){return Boolean(e&&e===Object(e))},removeCookie:function(e){document.cookie=encodeURIComponent(e)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+(u.cookieDomain?" domain="+u.cookieDomain+";":"")},isTrackingServerPopulated:function(){return!!u.trackingServer||!!u.trackingServerSecure},getTimestampInSeconds:function(){return Math.round((new Date).getTime()/1e3)},parsePipeDelimetedKeyValues:function(e){return e.split("|").reduce(function(e,t){var n=t.split("=");return e[n[0]]=decodeURIComponent(n[1]),e},{})},generateRandomString:function(e){e=e||5;for(var t="",n="abcdefghijklmnopqrstuvwxyz0123456789";e--;)t+=n[Math.floor(Math.random()*n.length)];return t},parseBoolean:function(e){return"true"===e||"false"!==e&&null},replaceMethodsWithFunction:function(e,t){for(var n in e)e.hasOwnProperty(n)&&"function"==typeof e[n]&&(e[n]=t);return e},pluck:function(e,t){return t.reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},Object.create(null))}};u._helpers=E;var L=N(u,f);u._destinationPublishing=L,u.timeoutMetricsLog=[];var w={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(e,t){switch(e){case"MC":!1===t?!0!==this.MCIDCallTimedOut&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=t;break;case y:!1===t?!0!==this.AnalyticsIDCallTimedOut&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=t;break;case D:!1===t?!0!==this.AAMIDCallTimedOut&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=t}}};u.isClientSideMarketingCloudVisitorID=function(){return w.isClientSideMarketingCloudVisitorID},u.MCIDCallTimedOut=function(){return w.MCIDCallTimedOut},u.AnalyticsIDCallTimedOut=function(){return w.AnalyticsIDCallTimedOut},u.AAMIDCallTimedOut=function(){return w.AAMIDCallTimedOut},u.idSyncGetOnPageSyncInfo=function(){return u._readVisitor(),u._getField("MCSYNCSOP")},u.idSyncByURL=function(e){var t=l(e||{});if(t.error)return t.error;var n,i,a=e.url,r=encodeURIComponent,s=L;return a=a.replace(/^https:/,"").replace(/^http:/,""),n=v.encodeAndBuildRequest(["",e.dpid,e.dpuuid||""],","),i=["ibs",r(e.dpid),"img",r(a),t.ttl,"",n],s.addMessage(i.join("|")),s.requestToProcess(),"Successfully queued"},u.idSyncByDataSource=function(e){return e===Object(e)&&"string"==typeof e.dpuuid&&e.dpuuid.length?(e.url="//dpm.demdex.net/ibs:dpid="+e.dpid+"&dpuuid="+e.dpuuid,u.idSyncByURL(e)):"Error: config or config.dpuuid is empty"},u._getCookieVersion=function(e){e=e||u.cookieRead(u.cookieName);var t=R.VERSION_REGEX.exec(e);return t&&t.length>1?t[1]:null},u._resetAmcvCookie=function(e){var t=u._getCookieVersion();t&&!M.isLessThan(t,e)||E.removeCookie(u.cookieName)},u.setAsCoopSafe=function(){g=!0},u.setAsCoopUnsafe=function(){g=!1},u.init=function(){!function(){if(t&&"object"==typeof t){for(var e in u.configs=Object.create(null),t)_(e)&&(u[e]=t[e],u.configs[e]=t[e]);u.idSyncContainerID=u.idSyncContainerID||0,g="boolean"==typeof u.isCoopSafe?u.isCoopSafe:E.parseBoolean(u.isCoopSafe),u.resetBeforeVersion&&u._resetAmcvCookie(u.resetBeforeVersion),u._attemptToPopulateIdsFromUrl(),u._attemptToPopulateSdidFromUrl(),u._readVisitor();var n=u._getField(m),i=Math.ceil((new Date).getTime()/R.MILLIS_PER_DAY);u.idSyncDisableSyncs||u.disableIdSyncs||!L.canMakeSyncIDCall(n,i)||(u._setFieldExpire(C,-1),u._setField(m,i)),u.getMarketingCloudVisitorID(),u.getAudienceManagerLocationHint(),u.getAudienceManagerBlob(),u._mergeServerState(u.serverState)}else u._attemptToPopulateIdsFromUrl(),u._attemptToPopulateSdidFromUrl()}(),function(){if(!u.idSyncDisableSyncs&&!u.disableIdSyncs){L.checkDPIframeSrc();var e=function(){var e=L;e.readyToAttachIframe()&&e.attachIframe()};d.addEventListener("load",function(){f.windowLoaded=!0,e()});try{O.receiveMessage(function(e){L.receiveMessage(e.data)},L.iframeHost)}catch(e){}}}(),u.whitelistIframeDomains&&R.POST_MESSAGE_ENABLED&&(u.whitelistIframeDomains=u.whitelistIframeDomains instanceof Array?u.whitelistIframeDomains:[u.whitelistIframeDomains],u.whitelistIframeDomains.forEach(function(t){var n=new S(e,t),i=A(u,n);O.receiveMessage(i,t)}))}};return U.getInstance=function(e,t){if(!e)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");e.indexOf("@")<0&&(e+="@AdobeOrg");var n=function(){var t=r.s_c_il;if(t)for(var n=0;n0&&L.domReady(L.bind(this.initialize,this))}function u(){var e=this.eventRegex=/^hover\(([0-9]+)\)$/,t=this.rules=[];L.each(L.rules,function(n){n.event.match(e)&&t.push([Number(n.event.match(e)[1]),n.selector])})}function d(e){this.delay=250,this.FB=e,L.domReady(L.bind(function(){L.poll(L.bind(this.initialize,this),this.delay,8)},this))}function f(t){L.domReady(L.bind(function(){this.twttr=t||e.twttr,this.initialize()},this))}function p(){this.lastURL=L.URL(),this._fireIfURIChanged=L.bind(this.fireIfURIChanged,this),this._onPopState=L.bind(this.onPopState,this),this._onHashChange=L.bind(this.onHashChange,this),this._pushState=L.bind(this.pushState,this),this._replaceState=L.bind(this.replaceState,this),this.initialize()}function g(e){L.BaseTool.call(this,e),this.defineListeners(),this.beaconMethod="plainBeacon",this.adapt=new g.DataAdapters,this.dataProvider=new g.DataProvider.Aggregate}function h(e){L.BaseTool.call(this,e),this.name=e.name||"VisitorID",this.initialize()}function m(e){L.BaseTool.call(this,e),this.varBindings={},this.events=[],this.products=[],this.customSetupFuns=[]}function v(){L.BaseTool.call(this),this.asyncScriptCallbackQueue=[],this.argsForBlockingScripts=[]}function y(e){L.BaseTool.call(this,e),this.styleElements={},this.targetPageParamsStore={}}function b(e){L.BaseTool.call(this,e),this.name=e.name||"Basic"}function D(e){L.BaseTool.call(this,e)}function S(e){L.BaseTool.call(this,e)}var C,k,_,I=Object.prototype.toString,E=e._satellite&&e._satellite.override,L={initialized:!1,$data:function(e,t,i){if(e){var a="__satellite__",r=L.dataCache,s=e[a];s||(s=e[a]=L.uuid++);var o=r[s];if(o||(o=r[s]={}),i===n)return o[t];o[t]=i}},uuid:1,dataCache:{},keys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},values:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},isArray:Array.isArray||function(e){return"[object Array]"===I.apply(e)},isObject:function(e){return null!=e&&!L.isArray(e)&&"object"==typeof e},isString:function(e){return"string"==typeof e},isNumber:function(e){return"[object Number]"===I.apply(e)&&!L.isNaN(e)},isNaN:function(e){return e!=e},isRegex:function(e){return e instanceof RegExp},isLinkTag:function(e){return!(!e||!e.nodeName||"a"!==e.nodeName.toLowerCase())},each:function(e,t,n){for(var i=0,a=e.length;i";t.push(e)}if(L.isArray(e))return"["+L.map(e,function(e){return L.stringify(e,t)}).join(",")+"]";if(L.isString(e))return'"'+String(e)+'"';if(L.isObject(e)){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(i+": "+L.stringify(e[i],t));return"{"+n.join(", ")+"}"}return String(e)},trim:function(e){return null==e?null:e.trim?e.trim():e.replace(/^ */,"").replace(/ *$/,"")},bind:function(e,t){return function(){return e.apply(t,arguments)}},throttle:function(e,t){var n=null;return function(){var i=this,a=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,a)},t)}},domReady:function(e){function n(e){for(f=1;e=a.shift();)e()}var i,a=[],r=!1,s=t,o=s.documentElement,c=o.doScroll,l="DOMContentLoaded",u="addEventListener",d="onreadystatechange",f=/^loade|^c/.test(s.readyState);return s[u]&&s[u](l,i=function(){s.removeEventListener(l,i,r),n()},r),c&&s.attachEvent(d,i=function(){/^c/.test(s.readyState)&&(s.detachEvent(d,i),n())}),e=c?function(t){self!=top?f?t():a.push(t):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){e(t)},50)}t()}()}:function(e){f?e():a.push(e)}}(),loadScript:function(e,n){var i=t.createElement("script");L.scriptOnLoad(e,i,n),i.src=e,t.getElementsByTagName("head")[0].appendChild(i)},scriptOnLoad:function(e,t,n){function i(e){e&&L.logError(e),n&&n(e)}"onload"in t?(t.onload=function(){i()},t.onerror=function(){i(new Error("Failed to load script "+e))}):"readyState"in t&&(t.onreadystatechange=function(){var e=t.readyState;"loaded"!==e&&"complete"!==e||(t.onreadystatechange=null,i())})},loadScriptOnce:function(e,t){L.loadedScriptRegistry[e]||L.loadScript(e,function(n){n||(L.loadedScriptRegistry[e]=!0),t&&t(n)})},loadedScriptRegistry:{},loadScriptSync:function(e){t.write?L.domReadyFired?L.notify('Cannot load sync the "'+e+'" script after DOM Ready.',1):(e.indexOf('"')>-1&&(e=encodeURI(e)),t.write('')):L.notify('Cannot load sync the "'+e+'" script because "document.write" is not available',1)},pushAsyncScript:function(e){L.tools["default"].pushAsyncScript(e)},pushBlockingScript:function(e){L.tools["default"].pushBlockingScript(e)},addEventHandler:e.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},removeEventHandler:e.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},preventDefault:e.addEventListener?function(e){e.preventDefault()}:function(e){e.returnValue=!1},stopPropagation:function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},containsElement:function(e,t){return e.contains?e.contains(t):!!(16&e.compareDocumentPosition(t))},matchesCss:function(n){function i(e,t){var n=t.tagName;return!!n&&e.toLowerCase()===n.toLowerCase()}var a=n.matchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||n.msMatchesSelector;return a?function(n,i){if(i===t||i===e)return!1;try{return a.call(i,n)}catch(r){return!1}}:n.querySelectorAll?function(e,t){if(!t.parentNode)return!1;if(e.match(/^[a-z]+$/i))return i(e,t);try{for(var n=t.parentNode.querySelectorAll(e),a=n.length;a--;)if(n[a]===t)return!0}catch(r){}return!1}:function(e,t){if(e.match(/^[a-z]+$/i))return i(e,t);try{return L.Sizzle.matches(e,[t]).length>0}catch(n){return!1}}}(t.documentElement),cssQuery:(C=t,C.querySelectorAll?function(e,t){var n;try{n=C.querySelectorAll(e)}catch(i){n=[]}t(n)}:function(e,t){if(L.Sizzle){var n;try{n=L.Sizzle(e)}catch(i){n=[]}t(n)}else L.sizzleQueue.push([e,t])}),hasAttr:function(e,t){return e.hasAttribute?e.hasAttribute(t):e[t]!==n},inherit:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},toArray:function(){try{var e=Array.prototype.slice;return e.call(t.documentElement.childNodes,0)[0].nodeType,function(t){return e.call(t,0)}}catch(n){return function(e){for(var t=[],n=0,i=e.length;n=n||e()||setTimeout(i,t)}var a=0;t=t||1e3,i()},escapeForHtml:function(e){return e?String(e).replace(/\&/g,"&").replace(/\/g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/"):e}};L.availableTools={},L.availableEventEmitters=[],L.fireOnceEvents=["condition","elementexists"],L.initEventEmitters=function(){L.eventEmitters=L.map(L.availableEventEmitters,function(e){return new e})},L.eventEmitterBackgroundTasks=function(){L.each(L.eventEmitters,function(e){"backgroundTasks"in e&&e.backgroundTasks()})},L.initTools=function(e){var t={"default":new v},n=L.settings.euCookieName||"sat_track";for(var i in e)if(e.hasOwnProperty(i)){var a,r,s;if((a=e[i]).euCookie)if("true"!==L.readCookie(n))continue;if(!(r=L.availableTools[a.engine])){var o=[];for(var c in L.availableTools)L.availableTools.hasOwnProperty(c)&&o.push(c);throw new Error("No tool engine named "+a.engine+", available: "+o.join(",")+".")}(s=new r(a)).id=i,t[i]=s}return t},L.preprocessArguments=function(e,t,n,i,a){function r(e){return i&&L.isString(e)?e.toLowerCase():e}function s(e){var c={};for(var l in e)if(e.hasOwnProperty(l)){var u=e[l];L.isObject(u)?c[l]=s(u):L.isArray(u)?c[l]=o(u,i):c[l]=r(L.replace(u,t,n,a))}return c}function o(e){for(var i=[],a=0,o=e.length;athis.keepLimit&&this.messages.shift(),this.outputEnabled&&this.echo(n,e)},getHistory:function(){return this.messages},clearHistory:function(){this.messages=[]},setOutputState:function(e){this.outputEnabled!=e&&(this.outputEnabled=e,e?this.flush():this.flushed=!1)},echo:function(t,n){e.console&&e.console[t]("SATELLITE: "+n)},flush:function(){this.flushed||(L.each(this.messages,function(e){!0!==e[2]&&(this.echo(e[0],e[1]),e[2]=!0)},this),this.flushed=!0)}},L.notify=L.bind(L.Logger.message,L.Logger),L.cleanText=function(e){return null==e?null:L.trim(e).replace(/\s+/g," ")},L.cleanText.legacy=function(e){return null==e?null:L.trim(e).replace(/\s{2,}/g," ").replace(/[^\000-\177]*/g,"")},L.text=function(e){return e.textContent||e.innerText},L.specialProperties={text:L.text,cleanText:function(e){return L.cleanText(L.text(e))}},L.getObjectProperty=function(e,t,i){for(var a,r=t.split("."),s=e,o=L.specialProperties,c=0,l=r.length;c2){var n=arguments[2];"pageview"===t?L.dataElementSafe.pageviewCache[e]=n:"session"===t?L.setCookie("_sdsat_"+e,n):"visitor"===t&&L.setCookie("_sdsat_"+e,n,730)}else{if("pageview"===t)return L.dataElementSafe.pageviewCache[e];if("session"===t||"visitor"===t)return L.readCookie("_sdsat_"+e)}},L.dataElementSafe.pageviewCache={},L.realGetDataElement=function(t){var n;return t.selector?L.hasSelector&&L.cssQuery(t.selector,function(e){if(e.length>0){var i=e[0];"text"===t.property?n=i.innerText||i.textContent:t.property in i?n=i[t.property]:L.hasAttr(i,t.property)&&(n=i.getAttribute(t.property))}}):t.queryParam?n=t.ignoreCase?L.getQueryParamCaseInsensitive(t.queryParam):L.getQueryParam(t.queryParam):t.cookie?n=L.readCookie(t.cookie):t.jsVariable?n=L.getObjectProperty(e,t.jsVariable):t.customJS?n=t.customJS():t.contextHub&&(n=t.contextHub()),L.isString(n)&&t.cleanText&&(n=L.cleanText(n)),n},L.getDataElement=function(e,t,i){if(null==(i=i||L.dataElements[e]))return L.settings.undefinedVarsReturnEmpty?"":null;var a=L.realGetDataElement(i);return a===n&&i.storeLength?a=L.dataElementSafe(e,i.storeLength):a!==n&&i.storeLength&&L.dataElementSafe(e,i.storeLength,a),a||t||(a=i["default"]||""),L.isString(a)&&i.forceLowerCase&&(a=a.toLowerCase()),a},L.getVar=function(i,a,r){var s,o,c=L.data.customVars,l=r?r.target||r.srcElement:null,u={uri:L.URI(),protocol:t.location.protocol,hostname:t.location.hostname};if(L.dataElements&&i in L.dataElements)return L.getDataElement(i);if((o=u[i.toLowerCase()])===n)if("this."===i.substring(0,5))i=i.slice(5),o=L.getObjectProperty(a,i,!0);else if("event."===i.substring(0,6))i=i.slice(6),o=L.getObjectProperty(r,i);else if("target."===i.substring(0,7))i=i.slice(7),o=L.getObjectProperty(l,i);else if("window."===i.substring(0,7))i=i.slice(7),o=L.getObjectProperty(e,i);else if("param."===i.substring(0,6))i=i.slice(6),o=L.getQueryParam(i);else if(s=i.match(/^rand([0-9]+)$/)){var d=Number(s[1]),f=(Math.random()*(Math.pow(10,d)-1)).toFixed(0);o=Array(d-f.length+1).join("0")+f}else o=L.getObjectProperty(c,i);return o},L.getVars=function(e,t,n){var i={};return L.each(e,function(e){i[e]=L.getVar(e,t,n)}),i},L.replace=function(e,t,n,i){return"string"!=typeof e?e:e.replace(/%(.*?)%/g,function(e,a){var r=L.getVar(a,t,n);return null==r?L.settings.undefinedVarsReturnEmpty?"":e:i?L.escapeForHtml(r):r})},L.escapeHtmlParams=function(e){return e.escapeHtml=!0,e},L.searchVariables=function(e,t,n){if(!e||0===e.length)return"";for(var i=[],a=0,r=e.length;a0)return!1;if(e.expired)return!1;if("inview"===o&&t.inviewDelay!==e.inviewDelay)return!1;if(!u&&(!1===e.bubbleFireIfParent||0!==i&&!1===e.bubbleFireIfChildFired))return!1;if(e.selector&&!L.matchesCss(e.selector,n))return!1;if(!L.propertiesMatch(s,n))return!1;if(null!=c)if("string"==typeof c){if(c!==n.value)return!1}else if(!c.test(n.value))return!1;if(a)try{if(!a.call(n,t,l))return L.notify('Condition for rule "'+e.name+'" not met.',1),!1}catch(f){return L.notify('Condition for rule "'+e.name+'" not met. Error: '+f.message,1),!1}if(r){var d=L.find(r,function(i){try{return!i.call(n,t,l)}catch(f){return L.notify('Condition for rule "'+e.name+'" not met. Error: '+f.message,1),!0}});if(d)return L.notify("Condition "+d.toString()+' for rule "'+e.name+'" not met.',1),!1}return!0},L.evtHandlers={},L.bindEvent=function(e,t){var n=L.evtHandlers;n[e]||(n[e]=[]),n[e].push(t)},L.whenEvent=L.bindEvent,L.unbindEvent=function(e,t){var n=L.evtHandlers;if(n[e]){var i=L.indexOf(n[e],t);n[e].splice(i,1)}},L.bindEventOnce=function(e,t){var n=function(){L.unbindEvent(e,n),t.apply(null,arguments)};L.bindEvent(e,n)},L.isVMLPoisoned=function(e){if(!e)return!1;try{e.nodeName}catch(t){if("Attribute only valid on v:image"===t.message)return!0}return!1},L.handleEvent=function(e){if(!L.$data(e,"eventProcessed")){var t=e.type.toLowerCase(),n=e.target||e.srcElement,i=0,a=L.rules,r=(L.tools,L.evtHandlers[e.type]);if(L.isVMLPoisoned(n))L.notify("detected "+t+" on poisoned VML element, skipping.",1);else{r&&L.each(r,function(t){t(e)}),n&&n.nodeName?L.notify("detected "+t+" on "+n.nodeName,1):L.notify("detected "+t,1);for(var s=n;s;s=s.parentNode){var o=!1;if(L.each(a,function(t){L.ruleMatches(t,e,s,i)&&(L.notify('Rule "'+t.name+'" fired.',1),L.fireRule(t,s,e),i++,t.bubbleStop&&(o=!0))}),o)break}L.$data(e,"eventProcessed",!0)}}},L.onEvent=t.querySelectorAll?function(e){L.handleEvent(e)}:(k=[],(_=function(e){e.selector?k.push(e):L.handleEvent(e)}).pendingEvents=k,_),L.fireEvent=function(e,t){L.onEvent({type:e,target:t})},L.registerEvents=function(e,t){for(var n=t.length-1;n>=0;n--){var i=t[n];L.$data(e,i+".tracked")||(L.addEventHandler(e,i,L.onEvent),L.$data(e,i+".tracked",!0))}},L.registerEventsForTags=function(e,n){for(var i=e.length-1;i>=0;i--)for(var a=e[i],r=t.getElementsByTagName(a),s=r.length-1;s>=0;s--)L.registerEvents(r[s],n)},L.setListeners=function(){var e=["click","submit"];L.each(L.rules,function(t){"custom"===t.event&&t.hasOwnProperty("customEvent")&&!L.contains(e,t.customEvent)&&e.push(t.customEvent)}),L.registerEvents(t,e)},L.getUniqueRuleEvents=function(){return L._uniqueRuleEvents||(L._uniqueRuleEvents=[],L.each(L.rules,function(e){-1===L.indexOf(L._uniqueRuleEvents,e.event)&&L._uniqueRuleEvents.push(e.event)})),L._uniqueRuleEvents},L.setFormListeners=function(){if(!L._relevantFormEvents){var e=["change","focus","blur","keypress"];L._relevantFormEvents=L.filter(L.getUniqueRuleEvents(),function(t){return-1!==L.indexOf(e,t)})}L._relevantFormEvents.length&&L.registerEventsForTags(["input","select","textarea","button"],L._relevantFormEvents)},L.setVideoListeners=function(){if(!L._relevantVideoEvents){var e=["play","pause","ended","volumechange","stalled","loadeddata"];L._relevantVideoEvents=L.filter(L.getUniqueRuleEvents(),function(t){return-1!==L.indexOf(e,t)})}L._relevantVideoEvents.length&&L.registerEventsForTags(["video"],L._relevantVideoEvents)},L.readStoredSetting=function(t){try{return t="sdsat_"+t,e.localStorage.getItem(t)}catch(n){return L.notify("Cannot read stored setting from localStorage: "+n.message,2),null}},L.loadStoredSettings=function(){var e=L.readStoredSetting("debug"),t=L.readStoredSetting("hide_activity");e&&(L.settings.notifications="true"===e),t&&(L.settings.hideActivity="true"===t)},L.isRuleActive=function(e,t){function n(e,t){return t=a(t,{hour:e[p](),minute:e[g]()}),Math.floor(Math.abs((e.getTime()-t.getTime())/864e5))}function i(e,t){function n(e){return 12*e[d]()+e[f]()}return Math.abs(n(e)-n(t))}function a(e,t){var n=new Date(e.getTime());for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];switch(i){case"hour":n[h](a);break;case"minute":n[m](a);break;case"date":n[v](a)}}return n}function r(e,t){return 60*e[p]()+e[g]()>60*t[p]()+t[g]()}function s(e,t){return 60*e[p]()+e[g]()<60*t[p]()+t[g]()}var o=e.schedule;if(!o)return!0;var c=o.utc,l=c?"getUTCDate":"getDate",u=c?"getUTCDay":"getDay",d=c?"getUTCFullYear":"getFullYear",f=c?"getUTCMonth":"getMonth",p=c?"getUTCHours":"getHours",g=c?"getUTCMinutes":"getMinutes",h=c?"setUTCHours":"setHours",m=c?"setUTCMinutes":"setMinutes",v=c?"setUTCDate":"setDate";if(t=t||new Date,o.repeat){if(r(o.start,t))return!1;if(s(o.end,t))return!1;if(t=o.endRepeat)return!1;if("daily"===o.repeat){if(o.repeatEvery)if(n(o.start,t)%o.repeatEvery!=0)return!1}else if("weekly"===o.repeat){if(o.days){if(!L.contains(o.days,t[u]()))return!1}else if(o.start[u]()!==t[u]())return!1;if(o.repeatEvery)if(n(o.start,t)%(7*o.repeatEvery)!=0)return!1}else if("monthly"===o.repeat){if(o.repeatEvery)if(i(o.start,t)%o.repeatEvery!=0)return!1;if(o.nthWeek&&o.mthDay){if(o.mthDay!==t[u]())return!1;var y=Math.floor((t[l]()-t[u]()+1)/7);if(o.nthWeek!==y)return!1}else if(o.start[l]()!==t[l]())return!1}else if("yearly"===o.repeat){if(o.start[f]()!==t[f]())return!1;if(o.start[l]()!==t[l]())return!1;if(o.repeatEvery)if(Math.abs(o.start[d]()-t[d]())%o.repeatEvery!=0)return!1}}else{if(o.start>t)return!1;if(o.end0&&L.equalsIgnoreCase(e.substring(n),t)},L.getVisitorId=function(){var e=L.getToolsByType("visitor_id");return 0===e.length?null:e[0].getInstance()},L.URI=function(){var e=t.location.pathname+t.location.search;return L.settings.forceLowerCase&&(e=e.toLowerCase()),e},L.URL=function(){var e=t.location.href;return L.settings.forceLowerCase&&(e=e.toLowerCase()),e},L.filterRules=function(){function e(e){return!!L.isRuleActive(e)}L.rules=L.filter(L.rules,e),L.pageLoadRules=L.filter(L.pageLoadRules,e)},L.ruleInScope=function(e,n){function i(e,t){function n(e){return t.match(e)}var i=e.include,r=e.exclude;if(i&&a(i,t))return!0;if(r){if(L.isString(r)&&r===t)return!0;if(L.isArray(r)&&L.any(r,n))return!0;if(L.isRegex(r)&&n(r))return!0}return!1}function a(e,t){function n(e){return t.match(e)}return!(!L.isString(e)||e===t)||(!(!L.isArray(e)||L.any(e,n))||!(!L.isRegex(e)||n(e)))}n=n||t.location;var r=e.scope;if(!r)return!0;var s=r.URI,o=r.subdomains,c=r.domains,l=r.protocols,u=r.hashes;return(!s||!i(s,n.pathname+n.search))&&((!o||!i(o,n.hostname))&&((!c||!a(c,n.hostname))&&((!l||!a(l,n.protocol))&&(!u||!i(u,n.hash)))))},L.backgroundTasks=function(){new Date;L.setFormListeners(),L.setVideoListeners(),L.loadStoredSettings(),L.registerNewElementsForDynamicRules(),L.eventEmitterBackgroundTasks();new Date},L.registerNewElementsForDynamicRules=function(){function e(t,n){var i=e.cache[t];if(i)return n(i);L.cssQuery(t,function(i){e.cache[t]=i,n(i)})}e.cache={},L.each(L.dynamicRules,function(t){e(t.selector,function(e){L.each(e,function(e){var n="custom"===t.event?t.customEvent:t.event;L.$data(e,"dynamicRules.seen."+n)||(L.$data(e,"dynamicRules.seen."+n,!0),L.propertiesMatch(t.property,e)&&L.registerEvents(e,[n]))})})})},L.ensureCSSSelector=function(){t.querySelectorAll?L.hasSelector=!0:(L.loadingSizzle=!0,L.sizzleQueue=[],L.loadScript(L.basePath()+"selector.js",function(){if(L.Sizzle){var e=L.onEvent.pendingEvents;L.each(e,function(e){L.handleEvent(e)},this),L.onEvent=L.handleEvent,L.hasSelector=!0,delete L.loadingSizzle,L.each(L.sizzleQueue,function(e){L.cssQuery(e[0],e[1])}),delete L.sizzleQueue}else L.logError(new Error("Failed to load selector.js"))}))},L.errors=[],L.logError=function(e){L.errors.push(e),L.notify(e.name+" - "+e.message,5)},L.pageBottom=function(){L.initialized&&(L.pageBottomFired=!0,L.firePageLoadEvent("pagebottom"))},L.stagingLibraryOverride=function(){if("true"===L.readStoredSetting("stagingLibrary")){for(var e,n,i,a=t.getElementsByTagName("script"),r=/^(.*)satelliteLib-([a-f0-9]{40})\.js$/,s=/^(.*)satelliteLib-([a-f0-9]{40})-staging\.js$/,o=0,c=a.length;o');else{var u=t.createElement("script");u.src=l,t.head.appendChild(u)}return!0}}return!1},L.checkAsyncInclude=function(){e.satellite_asyncLoad&&L.notify('You may be using the async installation of Satellite. In-page HTML and the "pagebottom" event will not work. Please update your Satellite installation for these features.',5)},L.hasMultipleDomains=function(){return!!L.settings.domainList&&L.settings.domainList.length>1},L.handleOverrides=function(){if(E)for(var e in E)E.hasOwnProperty(e)&&(L.data[e]=E[e])},L.privacyManagerParams=function(){var e={};L.extend(e,L.settings.privacyManagement);var t=[];for(var n in L.tools)if(L.tools.hasOwnProperty(n)){var i=L.tools[n],a=i.settings;if(!a)continue;"sc"===a.engine&&t.push(i)}var r=L.filter(L.map(t,function(e){return e.getTrackingServer()}),function(e){return null!=e});e.adobeAnalyticsTrackingServers=r;for(var s=["bannerText","headline","introductoryText","customCSS"],o=0;o0){var t=e[0];if(L.$data(t,"elementexists.seen"))return;L.$data(t,"elementexists.seen",!0),L.onEvent({type:"elementexists",target:t})}})})},L.availableEventEmitters.push(s),o.prototype={backgroundTasks:function(){var e=this.eventHandler;L.each(this.rules,function(t){L.cssQuery(t.selector||"video",function(t){L.each(t,function(t){L.$data(t,"videoplayed.tracked")||(L.addEventHandler(t,"timeupdate",L.throttle(e,100)),L.$data(t,"videoplayed.tracked",!0))})})})},evalRule:function(e,t){var n=t.event,i=e.seekable,a=i.start(0),r=i.end(0),s=e.currentTime,o=t.event.match(/^videoplayed\(([0-9]+)([s%])\)$/);if(o){var c=o[2],l=Number(o[1]),u="%"===c?function(){return l<=100*(s-a)/(r-a)}:function(){return l<=s-a};!L.$data(e,n)&&u()&&(L.$data(e,n,!0),L.onEvent({type:n,target:e}))}},onUpdateTime:function(e){var t=this.rules,n=e.target;if(n.seekable&&0!==n.seekable.length)for(var i=0,a=t.length;ii+a||n+t=0;e--)this.checkInView(this.elements[e])},processRules:function(e,t,n){var i=this.rules;n&&(i=L.filter(this.rules,function(e){return e.inviewDelay==n})),L.each(i,function(n,i){var a=n.inviewDelay?"viewed_"+n.inviewDelay:"viewed",r="inview_timeout_id_"+i;L.$data(e,a)||L.matchesCss(n.selector,e)&&t(n,a,r)})}},L.availableEventEmitters.push(c),l.prototype={obue:!1,initialize:function(){this.attachCloseListeners()},obuePrevUnload:function(){},obuePrevBeforeUnload:function(){},newObueListener:function(){this.obue||(this.obue=!0,this.triggerBeacons())},attachCloseListeners:function(){this.prevUnload=e.onunload,this.prevBeforeUnload=e.onbeforeunload,e.onunload=L.bind(function(t){this.prevUnload&&setTimeout(L.bind(function(){this.prevUnload.call(e,t)},this),1),this.newObueListener()},this),e.onbeforeunload=L.bind(function(t){this.prevBeforeUnload&&setTimeout(L.bind(function(){this.prevBeforeUnload.call(e,t)},this),1),this.newObueListener()},this)},triggerBeacons:function(){L.fireEvent("leave",t)}},L.availableEventEmitters.push(l),u.prototype={backgroundTasks:function(){var e=this;L.each(this.rules,function(t){var n=t[1],i=t[0];L.cssQuery(n,function(t){L.each(t,function(t){e.trackElement(t,i)})})},this)},trackElement:function(e,t){var n=this,i=L.$data(e,"hover.delays");i?L.contains(i,t)||i.push(t):(L.addEventHandler(e,"mouseover",function(t){n.onMouseOver(t,e)}),L.addEventHandler(e,"mouseout",function(t){n.onMouseOut(t,e)}),L.$data(e,"hover.delays",[t]))},onMouseOver:function(e,t){var n=e.target||e.srcElement,i=e.relatedTarget||e.fromElement;(t===n||L.containsElement(t,n))&&!L.containsElement(t,i)&&this.onMouseEnter(t)},onMouseEnter:function(e){var t=L.$data(e,"hover.delays"),n=L.map(t,function(t){return setTimeout(function(){L.onEvent({type:"hover("+t+")",target:e})},t)});L.$data(e,"hover.delayTimers",n)},onMouseOut:function(e,t){var n=e.target||e.srcElement,i=e.relatedTarget||e.toElement;(t===n||L.containsElement(t,n))&&!L.containsElement(t,i)&&this.onMouseLeave(t)},onMouseLeave:function(e){var t=L.$data(e,"hover.delayTimers");t&&L.each(t,function(e){clearTimeout(e)})}},L.availableEventEmitters.push(u),d.prototype={initialize:function(){if(this.FB=this.FB||e.FB,this.FB&&this.FB.Event&&this.FB.Event.subscribe)return this.bind(),!0},bind:function(){this.FB.Event.subscribe("edge.create",function(){L.notify("tracking a facebook like",1),L.onEvent({type:"facebook.like",target:t})}),this.FB.Event.subscribe("edge.remove",function(){L.notify("tracking a facebook unlike",1),L.onEvent({type:"facebook.unlike",target:t})}),this.FB.Event.subscribe("message.send",function(){L.notify("tracking a facebook share",1),L.onEvent({type:"facebook.send",target:t})})}},L.availableEventEmitters.push(d),f.prototype={initialize:function(){var e=this.twttr;e&&"function"==typeof e.ready&&e.ready(L.bind(this.bind,this))},bind:function(){this.twttr.events.bind("tweet",function(e){e&&(L.notify("tracking a tweet button",1),L.onEvent({type:"twitter.tweet",target:t}))})}},L.availableEventEmitters.push(f),p.prototype={initialize:function(){this.setupHistoryAPI(),this.setupHashChange()},fireIfURIChanged:function(){var e=L.URL();this.lastURL!==e&&(this.fireEvent(),this.lastURL=e)},fireEvent:function(){L.updateQueryParams(),L.onEvent({type:"locationchange",target:t})},setupSPASupport:function(){this.setupHistoryAPI(),this.setupHashChange()},setupHistoryAPI:function(){var t=e.history;t&&(t.pushState&&(this.originalPushState=t.pushState,t.pushState=this._pushState),t.replaceState&&(this.originalReplaceState=t.replaceState,t.replaceState=this._replaceState)),L.addEventHandler(e,"popstate",this._onPopState)},pushState:function(){var e=this.originalPushState.apply(history,arguments);return this.onPushState(),e},replaceState:function(){var e=this.originalReplaceState.apply(history,arguments);return this.onReplaceState(),e},setupHashChange:function(){L.addEventHandler(e,"hashchange",this._onHashChange)},onReplaceState:function(){setTimeout(this._fireIfURIChanged,0)},onPushState:function(){setTimeout(this._fireIfURIChanged,0)},onPopState:function(){setTimeout(this._fireIfURIChanged,0)},onHashChange:function(){setTimeout(this._fireIfURIChanged,0)},uninitialize:function(){this.cleanUpHistoryAPI(),this.cleanUpHashChange()},cleanUpHistoryAPI:function(){history.pushState===this._pushState&&(history.pushState=this.originalPushState),history.replaceState===this._replaceState&&(history.replaceState=this.originalReplaceState),L.removeEventHandler(e,"popstate",this._onPopState)},cleanUpHashChange:function(){L.removeEventHandler(e,"hashchange",this._onHashChange)}},L.availableEventEmitters.push(p),L.ecommerce={addItem:function(){var e=[].slice.call(arguments);L.onEvent({type:"ecommerce.additem",target:e})},addTrans:function(){var e=[].slice.call(arguments);L.data.saleData.sale={orderId:e[0],revenue:e[2]},L.onEvent({type:"ecommerce.addtrans",target:e})},trackTrans:function(){L.onEvent({type:"ecommerce.tracktrans",target:[]})}},L.visibility={isHidden:function(){var e=this.getHiddenProperty();return!!e&&t[e]},isVisible:function(){return!this.isHidden()},getHiddenProperty:function(){var e=["webkit","moz","ms","o"];if("hidden"in t)return"hidden";for(var n=0;n0&&this.setNonHumanDetectionDelay(1e3*parseInt(this.settings.nonHumanDetectionDelay))):this.notify("NHDM is not available.")},getAnalyticsTool:function(){if(this.settings.integratesWith)return L.tools[this.settings.integratesWith]},flushQueueWhenReady:function(){this.enableTracking&&this.tabEverVisible&&L.poll(L.bind(function(){if(this.isReadyToTrack())return this.flushQueue(),!0},this),100,20)},isReadyToTrack:function(){return this.tabEverVisible&&this.dataProvider.isReady()},$setVars:function(e,t,n){for(var i in n){var a=n[i];"function"==typeof a&&(a=a()),this.settings[i]=a}this.notify("Set variables done",2),this.prepareContextData()},$setEnableTracking:function(e,t,n){this.notify("Will"+(n?"":" not")+" track time on page",1),this.enableTracking!=n&&(this.addRemovePageLeaveEvent(n),this.addRemoveHumanDetectionChangeEvent(n),this.enableTracking=n)},$sendFirstBeacon:function(){this.sendViewBeacon()},setEnableNonHumanDetection:function(e){e?L.nonhumandetection.register(this):L.nonhumandetection.unregister(this)},setNonHumanDetectionDelay:function(e){L.nonhumandetection.register(this,e)},addRemovePageLeaveEvent:function(e){this.notify((e?"Attach onto":"Detach from")+" page leave event",1),L[0==e?"unbindEvent":"bindEvent"]("leave",this.onPageLeave)},addRemoveHumanDetectionChangeEvent:function(e){this.notify((e?"Attach onto":"Detach from")+" human detection change event",1),L[0==e?"unbindEvent":"bindEvent"]("humandetection.change",this.onHumanDetectionChange)},sendViewBeacon:function(){this.notify("Tracked page view.",1),this.sendBeaconWith()},sendDurationBeacon:function(){if(L.timetracking&&"function"==typeof L.timetracking.timeOnPage&&null!=L.timetracking.timeOnPage()){this.notify("Tracked close",1),this.sendBeaconWith({timeOnPage:Math.round(L.timetracking.timeOnPage()/1e3),duration:"D",timer:"timer"});var e;for(e=0;e0&&(t.events=r.join(",")),L.getVisitorId()&&(t.visitor=L.getVisitorId()),t},onSCodeLoaded:function(e){this.initialized=!0,this.initializing=!1;var t=["Adobe Analytics: loaded",e?" (manual)":"","."];L.notify(t.join(""),1),L.fireEvent(this.id+".load",this.getS()),e||(this.flushQueueExceptTrackLink(),this.sendBeacon()),this.flushQueue()},getAccount:function(t){return e.s_account?e.s_account:t&&this.settings.accountByHost&&this.settings.accountByHost[t]||this.settings.account},getTrackingServer:function(){var t=this,n=t.getS();if(n){if(n.ssl&&n.trackingServerSecure)return n.trackingServerSecure;if(n.trackingServer)return n.trackingServer}var i,a=t.getAccount(e.location.hostname);if(!a)return null;var r,s,o="",c=n&&n.dc;return(r=(i=a).indexOf(","))>=0&&(i=i.gb(0,r)),i=i.replace(/[^A-Za-z0-9]/g,""),o||(o="2o7.net"),c=c?(""+c).toLowerCase():"d1","2o7.net"==o&&("d1"==c?c="112":"d2"==c&&(c="122"),s=""),r=i+"."+c+"."+s+o},sendBeacon:function(){var t=this.getS(e[this.settings.renameS||"s"]);t?this.settings.customInit&&!1===this.settings.customInit(t)?L.notify("Adobe Analytics: custom init suppressed beacon",1):(this.settings.executeCustomPageCodeFirst&&this.applyVarBindingsOnTracker(t,this.varBindings),this.executeCustomSetupFuns(t),t.t(),this.clearVarBindings(),this.clearCustomSetup(),L.notify("Adobe Analytics: tracked page view",1)):L.notify("Adobe Analytics: page code not loaded",1)},pollForSC:function(){L.poll(L.bind(function(){if("function"==typeof e.s_gi)return this.onSCodeLoaded(!0),!0},this))},flushQueueExceptTrackLink:function(){if(this.pending){for(var e=[],t=0;t0&&u.push("events"),o.products&&u.push("products"),u=this.mergeTrackLinkVars(o.linkTrackVars,u),s=this.mergeTrackLinkVars(o.linkTrackEvents,s),o.linkTrackVars=this.getCustomLinkVarsList(u);var d=L.map(s,function(e){return e.split(":")[0]});o.linkTrackEvents=this.getCustomLinkVarsList(d),o.tl(!0,i||"o",a),L.notify(["Adobe Analytics: tracked link ","using: linkTrackVars=",L.stringify(o.linkTrackVars),"; linkTrackEvents=",L.stringify(o.linkTrackEvents)].join(""),1),o.linkTrackVars=c,o.linkTrackEvents=l}else L.notify("Adobe Analytics: page code not loaded",1)},mergeTrackLinkVars:function(e,t){return e&&(t=e.split(",").concat(t)),t},getCustomLinkVarsList:function(e){var t=L.indexOf(e,"None");return t>-1&&e.length>1&&e.splice(t,1),e.join(",")},definedVarNames:function(e){e=e||this.varBindings;var t=[];for(var n in e)e.hasOwnProperty(n)&&/^(eVar[0-9]+)|(prop[0-9]+)|(hier[0-9]+)|campaign|purchaseID|channel|server|state|zip|pageType$/.test(n)&&t.push(n);return t},$trackPageView:function(e,t,n){var i=n&&n.setVars,a=n&&n.addEvent||[],r=this.getS(null,{setVars:i,addEvent:a});r?(r.linkTrackVars="",r.linkTrackEvents="",this.executeCustomSetupFuns(r),n&&n.customSetup&&n.customSetup.call(e,t,r),r.t(),this.clearVarBindings(),this.clearCustomSetup(),L.notify("Adobe Analytics: tracked page view",1)):L.notify("Adobe Analytics: page code not loaded",1)},$postTransaction:function(t,n,i){var a=L.data.transaction=e[i],r=this.varBindings,s=this.settings.fieldVarMapping;if(L.each(a.items,function(e){this.products.push(e)},this),r.products=L.map(this.products,function(e){var t=[];if(s&&s.item)for(var n in s.item)if(s.item.hasOwnProperty(n)){var i=s.item[n];t.push(i+"="+e[n]),"event"===i.substring(0,5)&&this.events.push(i)}var a=["",e.product,e.quantity,e.unitPrice*e.quantity];return t.length>0&&a.push(t.join("|")),a.join(";")},this).join(","),s&&s.transaction){var o=[];for(var c in s.transaction)if(s.transaction.hasOwnProperty(c)){i=s.transaction[c];o.push(i+"="+a[c]),"event"===i.substring(0,5)&&this.events.push(i)}r.products.length>0&&(r.products+=","),r.products+=";;;;"+o.join("|")}},$addEvent:function(){for(var e=2,t=arguments.length;e0&&a&&r.shift().call(e,t,s);var c=n.shift();if(c){var l=L.data.host,u=o.scriptURL(c.src);l&&(u=L.basePath()+u),a=c,L.loadScript(u,i)}}try{n=n.slice(0);var a,r=this.asyncScriptCallbackQueue,s=t.target||t.srcElement,o=this}catch(c){console.error("scripts is",L.stringify(n))}i()},$loadBlockingScript:function(e,t,n){var i=n.scripts;n.loadOn;L.bind(function(){L.each(i,function(n){this.loadBlockingScript(e,t,n)},this)},this)()},loadBlockingScript:function(e,t,n){var i=this.scriptURL(n.src),a=L.data.host,r=t.target||t.srcElement;a&&(i=L.basePath()+i),this.argsForBlockingScripts.push([e,t,r]),L.loadScriptSync(i)},pushAsyncScript:function(e){this.asyncScriptCallbackQueue.push(e)},pushBlockingScript:function(e){var t=this.argsForBlockingScripts.shift(),n=t[0];e.apply(n,t.slice(1))},$writeHTML:L.escapeHtmlParams(function(e,n){if(!L.domReadyFired&&t.write)if("pagebottom"===n.type||"pagetop"===n.type)for(var i=2,a=arguments.length;i1){L.stringify(e.slice(1));t+=" with parameters "+L.stringify(e.slice(1))}t+=".",L.notify(t,1)}}),L.availableTools.ga_universal=D,L.inherit(S,L.BaseTool),L.extend(S.prototype,{name:"GA",initialize:function(){var t=this.settings,n=e._gaq,i=t.initCommands||[],a=t.customInit;if(n||(_gaq=[]),this.isSuppressed())L.notify("GA: page code not loaded(suppressed).",1);else{if(!n&&!S.scriptLoaded){var r=L.isHttps(),s=(r?"https://ssl":"http://www")+".google-analytics.com/ga.js";t.url&&(s=r?t.url.https:t.url.http),L.loadScript(s),S.scriptLoaded=!0,L.notify("GA: page code loaded.",1)}t.domain;var o=t.trackerName,c=A.allowLinker(),l=L.replace(t.account,location);L.settings.domainList;_gaq.push([this.cmd("setAccount"),l]),c&&_gaq.push([this.cmd("setAllowLinker"),c]),_gaq.push([this.cmd("setDomainName"),A.cookieDomain()]),L.each(i,function(e){var t=[this.cmd(e[0])].concat(L.preprocessArguments(e.slice(1),location,null,this.forceLowerCase));_gaq.push(t)},this),a&&(this.suppressInitialPageView=!1===a(_gaq,o)),t.pageName&&this.$overrideInitialPageView(null,null,t.pageName)}this.initialized=!0,L.fireEvent(this.id+".configure",_gaq,o)},isSuppressed:function(){return this._cancelToolInit||!1===this.settings.initTool},tracker:function(){return this.settings.trackerName},cmd:function(e){var t=this.tracker();return t?t+"._"+e:"_"+e},$overrideInitialPageView:function(e,t,n){this.urlOverride=n},trackInitialPageView:function(){if(!this.isSuppressed()&&!this.suppressInitialPageView)if(this.urlOverride){var e=L.preprocessArguments([this.urlOverride],location,null,this.forceLowerCase);this.$missing$("trackPageview",null,null,e)}else this.$missing$("trackPageview")},endPLPhase:function(e){e===this.settings.loadOn&&(L.notify("GA: Initializing at "+e,1),this.initialize(),this.flushQueue(),this.trackInitialPageView())},call:function(e,t,n,i){if(!this._cancelToolInit){this.settings;var a=this.tracker(),r=this.cmd(e);i=i?[r].concat(i):[r];_gaq.push(i),a?L.notify("GA: sent command "+e+" to tracker "+a+(i.length>1?" with parameters ["+i.slice(1).join(", ")+"]":"")+".",1):L.notify("GA: sent command "+e+(i.length>1?" with parameters ["+i.slice(1).join(", ")+"]":"")+".",1)}},$missing$:function(e,t,n,i){this.call(e,t,n,i)},$postTransaction:function(t,n,i){var a=L.data.customVars.transaction=e[i];this.call("addTrans",t,n,[a.orderID,a.affiliation,a.total,a.tax,a.shipping,a.city,a.state,a.country]),L.each(a.items,function(e){this.call("addItem",t,n,[e.orderID,e.sku,e.product,e.category,e.unitPrice,e.quantity])},this),this.call("trackTrans",t,n)},delayLink:function(e,t){var n=this;if(A.allowLinker()&&e.hostname.match(this.settings.linkerDomains)&&!L.isSubdomainOf(e.hostname,location.hostname)){L.preventDefault(t);var i=L.settings.linkDelay||100;setTimeout(function(){n.call("link",e,t,[e.href])},i)}},popupLink:function(t,n){if(e._gat){L.preventDefault(n);var i=this.settings.account,a=e._gat._createTracker(i)._getLinkerUrl(t.href);e.open(a)}},$link:function(e,t){"_blank"===e.getAttribute("target")?this.popupLink(e,t):this.delayLink(e,t)},$trackEvent:function(e,t){var n=Array.prototype.slice.call(arguments,2);if(n.length>=4&&null!=n[3]){var i=parseInt(n[3],10);L.isNaN(i)&&(i=1),n[3]=i}this.call("trackEvent",e,t,n)}}),L.availableTools.ga=S,_satellite.init({tools:{"9dc2a8dab91a1b2416c23f7a94b5432c":{engine:"ga_universal",pageName:"%URI%",forceLowerCase:!0,euCookie:!1,loadOn:"pagetop",initCommands:[],customInit:function(){return!1},trackerSettings:{trackingId:"UA-54981048-5",allowAnchor:!1}},"159ba5118d83614f64ade166261a5ad7":{engine:"sc",loadOn:"pagetop",account:"lclbeautyboutiqueprod",euCookie:!1,sCodeURL:"ec12e179889c41354087f1ac19e02839d7c19f0e/s-code-contents-0a66dcb36de40fa98d1c4ca73cf6bb938a017603.js",renameS:"s",initVars:{charSet:"UTF-8",currencyCode:"CAD",trackingServer:"lcljoefresh.sc.omtrdc.net",trackingServerSecure:"lcljoefresh.sc.omtrdc.net",trackInlineStats:!0,trackDownloadLinks:!0,linkDownloadFileTypes:"avi,css,csv,doc,docx,eps,exe,jpg,js,m4v,mov,mp3,pdf,png,ppt,pptx,rar,svg,tab,txt,vsd,vxd,wav,wma,wmv,xls,xlsx,xml,zip",trackExternalLinks:!0,linkInternalFilters:"javascript:,mailto:,pharmaprix.ca/en/pcoptimum,pharmaprix.ca/fr/pcoptimum,shoppersdrugmart.ca/en/pcoptimum,shoppersdrugmart.ca/fr/pcoptimum,tel:",linkLeaveQueryString:!0,dynamicVariablePrefix:"D="},skipSetAccount:!0,customInit:function(){return!1}},c2596d95b96e82dbd2a024471d418029c1dec75a:{engine:"visitor_id",loadOn:"pagetop",name:"VisitorID",mcOrgId:"99911CFE5329657B0A490D45@AdobeOrg",autoRequest:!0,initVars:{trackingServer:"lcljoefresh.sc.omtrdc.net",trackingServerSecure:"lcljoefresh.sc.omtrdc.net",marketingCloudServer:"lcljoefresh.sc.omtrdc.net",marketingCloudServerSecure:"lcljoefresh.sc.omtrdc.net"}}},pageLoadRules:[{name:"Adobe Analytics Plugins",trigger:[{engine:"sc",command:"customSetup",arguments:[function(e,t){t.apl=new Function("l","v","d","u","var s=this,m=0;if(!l)l='';if(u){var i,n,a=s.split(l,d);for(i=0;i-1?i:l.length;a[x++]=l.substring(0,i);l=l.substring(i+d.length);}return a")}]}],event:"pagetop"},{name:"GA - Order Confirmation Ecomm Tracking",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b76ffeb64746d450c0037d7.js"}]}]}],scope:{URI:{include:["/confirmation/"]}},event:"pagetop"},{name:"GA General Pageview",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b5f18ad64746d6feb000d0b.js"}]}]}],scope:{URI:{exclude:["confirmation"]}},event:"pagebottom"},{name:"PIXELS - Bing",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b731b3764746d665e0004c2.js"}]}]}],scope:{URI:{include:[/\/pcoptimum/i]}},event:"pagebottom"},{name:"PIXELS - Bluecore",trigger:[{command:"loadScript",arguments:[{sequential:!1,scripts:[{src:"satellite-5b72fe7d64746d11c20041d1.js"}]}]}],scope:{URI:{include:[/\/pcoptimum/i]}},event:"pagebottom"},{name:"PIXELS - Facebook",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b730d9264746d11bf004ae3.js"}]}]}],event:"pagebottom"},{name:"PIXELS - Google gTag",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b71f0d364746d01890022f3.js"}]}]}],event:"pagebottom"},{name:"PIXELS - Rakuten",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b731acf64746d2bd30045be.js"}]}]}],scope:{URI:{include:["/pcoptimum"]}},event:"pagebottom"},{name:"PLP Tile Position",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b5f17c364746d2176000df2.js"}]}]}],scope:{URI:{include:["/c/"]}},event:"pagebottom"},{name:"USABILITY - CrazyEgg Library",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b71ac3b64746d2cf0003af5.js"}]}]}],scope:{URI:{include:[/\/pcoptimum/i]}},event:"pagebottom"}],rules:[{name:"Link Name Change",trigger:[{engine:"sc",command:"trackLink",arguments:[{type:"o",linkName:"D=v42",customSetup:function(n,i){i.clearVars(),i.pageURL=t.location.href.toLowerCase(),i.pageName="sdm|pc-optimum|"+e.analyticsData.pageSection+"|"+e.analyticsData.pageName,i.channel="sdm|pc-optimum|"+e.analyticsData.pageSection,i.server=t.location.hostname.toLowerCase(),i.hier1="D=pageName",i.eVar1="D=pageName",i.eVar2=DataLayer["page-language"],i.eVar3=DataLayer["site-type"],i.eVar4=DataLayer["login-status"],i.eVar5=DataLayer["utc-timestamp"],i.eVar6="D=t",i.eVar7="D=t",i.eVar8=DataLayer["day-of-week"]+"|"+DataLayer["hour-of-day"],i.eVar18=DataLayer["customer-wallet-id"],i.eVar19="D=mid",i.eVar40="D=g",i.eVar41="D=r",i.eVar42=e.analyticsData.linkName,i.getPreviousValue?i.eVar43=i.getPreviousValue(i.pageName,"gpv_pn"):i.eVar43="",i.eVar44=e.analyticsData.errorMessage,i.eVar45=e.analyticsData.errorCode,i.eVar46=e.analyticsData.stayLoggedIn,i.eVar47=e.analyticsData.trustDevice,i.prop1="D=pageName",i.eVar2?i.prop2="D=v2":i.prop2="",i.eVar3?i.prop3="D=v3":i.prop3="",i.eVar4?i.prop4="D=v4":i.prop4="",i.eVar6?i.prop5="D=v6":i.prop5="",i.eVar8?i.prop6="D=v8":i.prop6="",i.prop7=DataLayer["page-section1"],i.prop8=DataLayer["page-section2"],i.prop9=DataLayer["page-section3"],i.prop10="D=User-Agent",i.prop12="D=pageName",i.eVar42?i.prop11="D=v42":i.prop11="",i.eVar43?i.prop16="D=v43":i.prop16="",i.prop17="D=g",i.prop18="D=r",i.campaign?i.prop19="D=v0":i.prop19="D=pageName",i.eVar11?i.prop20="D=v11":i.prop20="D=pageName"}}]},{command:"loadScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b16e82964746d5080007588.js"}]}]}],event:"dataelementchange(linkName)",bubbleFireIfParent:!0,bubbleFireIfChildFired:!0,bubbleStop:!1},{name:"PIXELS - Facebook AddToCart",trigger:[{command:"loadScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b733b3564746d665d002ef0.js"}]}]}],conditions:[function(){return _satellite.textMatch(_satellite.getVar("linkName"),/add-to-bag/i)}],event:"dataelementchange(linkName)",bubbleFireIfParent:!0,bubbleFireIfChildFired:!0,bubbleStop:!1},{name:"Page Name Change",trigger:[{engine:"sc",command:"trackPageView",arguments:[{customSetup:function(n,i){i.clearVars(),i.pageURL=t.location.href.toLowerCase(),i.pageName="sdm|pc-optimum|"+e.analyticsData.pageSection+"|"+e.analyticsData.pageName,i.channel="sdm|pc-optimum|"+e.analyticsData.pageSection,i.server=t.location.hostname.toLowerCase(),i.hier1="D=pageName",i.eVar1="D=pageName",i.eVar2=DataLayer["page-language"],i.eVar3=DataLayer["site-type"],i.eVar4=DataLayer["login-status"],i.eVar5=DataLayer["utc-timestamp"],i.eVar6="D=t",i.eVar7="D=t",i.eVar8=DataLayer["day-of-week"]+"|"+DataLayer["hour-of-day"],i.eVar18=DataLayer["customer-wallet-id"],i.eVar19="D=mid",i.eVar40="D=g",i.eVar41="D=r",i.getPreviousValue?i.eVar43=i.getPreviousValue(i.pageName,"gpv_pn"):i.eVar43="",i.prop1="D=pageName",i.eVar2?i.prop2="D=v2":i.prop2="",i.eVar3?i.prop3="D=v3":i.prop3="",i.eVar4?i.prop4="D=v4":i.prop4="",i.eVar6?i.prop5="D=v6":i.prop5="",i.eVar8?i.prop6="D=v8":i.prop6="",i.prop7=DataLayer["page-section1"],i.prop8=DataLayer["page-section2"],i.prop9=DataLayer["page-section3"],i.prop10="D=User-Agent",i.prop12="D=pageName",i.eVar43?i.prop16="D=v43":i.prop16="",i.prop17="D=g",i.prop18="D=r",i.campaign?i.prop19="D=v0":i.prop19="D=pageName",i.eVar11?i.prop20="D=v11":i.prop20="D=pageName",i.eVar37?i.prop20="D=v37":i.prop20=""}}]},{command:"loadScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b16e7a764746d2a6f0038ed.js"}]}]}],event:"dataelementchange(pageName)",bubbleFireIfParent:!0,bubbleFireIfChildFired:!0,bubbleStop:!1},{name:"facebook like",event:"facebook.like",trigger:[{command:"send",arguments:[{hitType:"social",socialNetwork:"facebook",socialAction:"like",socialTarget:t.location.href}],tool:["9dc2a8dab91a1b2416c23f7a94b5432c"]}]},{name:"facebook unlike",event:"facebook.unlike",trigger:[{command:"send",arguments:[{hitType:"social",socialNetwork:"facebook",socialAction:"unlike",socialTarget:t.location.href}],tool:["9dc2a8dab91a1b2416c23f7a94b5432c"]}]},{name:"facebook send",event:"facebook.send",trigger:[{command:"send",arguments:[{hitType:"social",socialNetwork:"facebook",socialAction:"send",socialTarget:t.location.href}],tool:["9dc2a8dab91a1b2416c23f7a94b5432c"]}]},{name:"twitter tweet",event:"twitter.tweet",trigger:[{command:"send",arguments:[{hitType:"social",socialNetwork:"twitter",socialAction:"tweet",socialTarget:t.location.href}],tool:["9dc2a8dab91a1b2416c23f7a94b5432c"]}]}],directCallRules:[{name:"customlink",trigger:[{engine:"sc",command:"trackLink",arguments:[{type:"o",linkName:"D=v42",customSetup:function(e,n){if(n.clearVars(),n.pageURL=t.location.href.toLowerCase(),"undefined"!=typeof DataLayer["page-section2"]&&DataLayer["page-section2"]||(DataLayer["page-section2"]=DataLayer["page-section1"]),"undefined"!=typeof DataLayer["page-section3"]&&DataLayer["page-section3"]||(DataLayer["page-section3"]=DataLayer["page-section2"]),n.pageName="sdm|"+DataLayer["page-section1"]+"|"+DataLayer["page-section2"]+"|"+DataLayer["page-section3"]+"|"+DataLayer["page-name"],n.channel="sdm|"+DataLayer["page-section1"],n.server=t.location.hostname.toLowerCase(),n.hier1="D=pageName",n.eVar1="D=pageName",n.eVar2=DataLayer["page-language"],n.eVar3=DataLayer["site-type"],n.eVar4=DataLayer["login-status"],n.eVar5=DataLayer["utc-timestamp"],n.eVar6="D=t",n.eVar7="D=t",n.eVar8=DataLayer["day-of-week"]+"|"+DataLayer["hour-of-day"],n.eVar18=DataLayer["customer-wallet-id"],n.eVar19="D=mid",n.eVar26=DataLayer["offer-status"],n.eVar27=DataLayer["offer-template-number"],n.eVar30=DataLayer["offer-name"],n.eVar40="D=g",n.eVar41="D=r",n.eVar42=DataLayer["link-name"],n.getPreviousValue?n.eVar43=n.getPreviousValue(n.pageName,"gpv_pn"):n.eVar43="",n.prop1="D=pageName",n.eVar2?n.prop2="D=v2":n.prop2="",n.eVar3?n.prop3="D=v3":n.prop3="",n.eVar4?n.prop4="D=v4":n.prop4="",n.eVar6?n.prop5="D=v6":n.prop5="",n.eVar8?n.prop6="D=v8":n.prop6="",n.prop7=DataLayer["page-section1"],n.prop8=DataLayer["page-section2"],n.prop9=DataLayer["page-section3"],n.prop10="D=User-Agent",n.prop11="D=v42",n.prop12="D=v42",n.eVar43?n.prop16="D=v43":n.prop16="",n.prop17="D=g",n.prop18="D=r",n.campaign?n.prop19="D=v0":n.prop19="D=pageName",n.eVar11?n.prop20="D=v11":n.prop20="D=pageName",n.events="event2",n.eVar42)switch(n.eVar42.toLowerCase()){case"load-offers-success":n.events=n.apl(n.events,"event17",",",1),n.eVar28=DataLayer["offers-per-status"],n.eVar29=DataLayer["offers-per-template"];var i="",a="",r=DataLayer["offers-per-status"]?DataLayer["offers-per-status"]:"";if(r){var s,o=r.split("|");for(l=0;l